home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 3_7.lha / 3_7 / 3_7fgtst.c < prev    next >
Text File  |  1993-08-08  |  531b  |  31 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. include <stream.h>
  6. include <error.h>
  7.  
  8. include "3_7f.c"
  9.  
  10. truct sp
  11.    { char *a, *b; } x[] = {
  12. { "abcd", "abcd" },
  13. { "abc", "abcd" },
  14. { "abcd", "abc" },
  15. { "abdc", "abcd" },
  16. { "abdc", "abcda" },
  17. { "abdc", "abc" },
  18. { 0, 0 }
  19.    };
  20.  
  21. ain()
  22.  
  23.    for (sp *xp = x; xp->a; xp++)
  24. {
  25. cout << "a='" << xp->a << "', b='" << xp->b << "'\n";
  26. cout << "cmp=" << strcmp(xp->a, xp->b) << "\n";
  27. }
  28.  
  29.    return 0;
  30.  
  31.